Christopher Oddom, Denis Folitse, Sandani Kumanayake, Owen Gallagher
2023-05-08
Diabetes is a chronic condition that affects how the body processes blood sugar (glucose). It occurs when the pancreas does not produce enough insulin or when the body cannot effectively use the insulin it produces.
Type 1 diabetes, also known as juvenile diabetes, is an autoimmune disease that usually develops in childhood or adolescence. It occurs when the body’s immune system mistakenly attacks and destroys the cells in the pancreas that produce insulin.
Type 2 diabetes, which accounts for 90-95% of all cases, is usually diagnosed in adults, but it is becoming more common in children and adolescents due to rising rates of obesity. It occurs when the body becomes resistant to the effects of insulin or when the pancreas cannot produce enough insulin to meet the body’s needs.
The risk factors for type 2 diabetes include physical inactivity, a family history of diabetes, high blood pressure and high cholesterol.
Diabetes is a leading cause of blindness, kidney failure, amputations, heart attacks, and stroke.
According to Mayo Clinic(2021), There is no cure for diabetes, but it can be managed through lifestyle changes, such as eating a healthy diet, getting regular exercise, and monitoring blood sugar levels, as well as medications like insulin and oral hypoglycemic drugs.
According to the World Health Organization, the number of people with diabetes has risen from 108 million in 1980 to 422 million in 2014.
In addition to the physical health complications of diabetes, it can also have a significant impact on mental health. People with diabetes are at increased risk of depression, anxiety, and other mood disorders.
Research is ongoing to better understand the causes of diabetes and to develop new treatments and prevention strategies. Generalized additive models (GAMs) are one tool that can be used to explore the relationship between diabetes and its risk factors.
To understand the relationship between the risk factors of diabetes and their impact on getting diabetes using a GAM logistic regression.
To consider the possibility of three-way interaction using tensor product smoothing, that way we can see the interactive effects of risk factors on diabetes.
To compare the predictions from the GAM fit with a selected best performing machine learning algorithm for predicting diabetes.
Data
This data is collected from kaggle, updated by Aksha Gattatray Khare with the objective of predicting whether a patient has diabetes, based on certain diagnostic measurements. In total, the data contains 8 variables listed below
Outcomes: To express the final result 1 is Yes and 0 is No
Pregnancies: indicates the number of pregnancies
Glucose: indicates the plasma glucose concentration
Blood Pressure: indicates diastolic blood pressure in mm/Hg
Skin Thickness: indicates triceps skinfold thickness in mm
dpfunction: indicates the function which scores likelihood of diabetes based on family history
age: indicates the age of the person
Insulin: indicates insulin in blood (U/mL)
bmi: indicates the body mass index in kg/m2
GAMs
Random Forest (RF)
Naive Bayes (NB)
Stochastic Gradient Boost (SGB)
K-Nearest Neighbors Algorithm (KNN)
Histogram of Original Variables
Stripplot
Histogram of Variables
Boxplot of Variables by Outcome
Pair Plot
Correlation Matrix
Partial-Effect Plots
Tensor Product Plot
Appraisal
| Model | Diabetic_Misclass | Non_Diabetic_Misclass |
|---|---|---|
| GAMs | 0.40625 | 0.0444444 |
| NB | 0.21875 | 0.1777778 |
| RF | 0.46875 | 0.1333333 |
| SGB | 0.37500 | 0.0666667 |
| KNN | 0.50000 | 0.1555556 |
American Diabetes Association. (n.d.). What is Diabetes? https://www.diabetes.org/diabetes/what-is-diabetes
World Health Organization. (2016). Global report on diabetes. https://www.who.int/publications/i/item/9789241565257
American Diabetes Association. (n.d.). Diabetes Complications. https://www.diabetes.org/diabetes/complications
Mayo Clinic. (2021). Type 1 diabetes. https://www.mayoclinic.org/diseases-conditions/type-1-diabetes/symptoms-causes/syc-20353011
Centers for Disease Control and Prevention. (2021). Type 2 Diabetes. https://www.cdc.gov/diabetes/basics/type2.html
Mayo Clinic. (2021). Diabetes. https://www.mayoclinic.org/diseases-conditions/diabetes/diagnosis-treatment/drc-20371451
Centers for Disease Control and Prevention. (2021). Risk Factors for Type 2 Diabetes. https://www.cdc.gov/diabetes/basics/risk-factors.html
American Diabetes Association. (n.d.). Mental Health. https://www.diabetes.org/diabetes/mental-health
Wood, S. N. (2017). Generalized Additive Models: An Introduction with R (2nd ed.). CRC Press.